package com.example.thethirdcodepractice

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_broadcast_send.*

class BroadcastSendActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_broadcast_send)
        btn_send_broadcast.setOnClickListener {
            val intent = Intent("com.example.thethirdcodepractice.receiver.MyBroadcastReceiver")
            intent.`package` = packageName
            //sendBroadcast(intent)
            sendOrderedBroadcast(intent, null)
        }
    }
}
